package com.zy.assemble.fragment

import android.content.Intent
import com.zy.activity.BaseListFragment
import com.zy.activity.adapter.FragmentListBean
import com.zy.activity.adapter.ShowType
import com.zy.settings.SettingsListMainActivity
import com.zy.settings.SettingsMainActivity
import com.zy.test.widget.WidgetListMainActivity
import java.util.ArrayList

class SettingsMainFragment : BaseListFragment() {
    override fun init(list: ArrayList<FragmentListBean>) {
        //list.add(FragmentListBean(ShowType.HEAD, "设置"))
        list.add(FragmentListBean(ShowType.COMMON, "数据备份", "算法布局数据", 1))
    }

    override fun clickItem(bean: FragmentListBean) {
        when (bean.code) {
            1 -> {
                requireActivity().startActivity(
                    Intent(
                        requireContext(), SettingsMainActivity::class.java
                    )
                )
            }
        }

    }

    companion object {
        fun newInstance() = SettingsMainFragment()
    }
}